void Floyd(AMGraph* G) {
	int distance[MVNum][MVNum];
	int i, j, k;
	for (i = 0; i < G->vexnum; i++) {
		for (j = 0; j < G->vexnum; j++) {
			distance[i][j] = G->arcs[i][j];
		}
	}
	for (k = 0; k < G->vexnum; k++) {
		for (i = 0; i < G->vexnum; i++) {
			for (j = 0; j < G->vexnum; j++) {
 
				if (distance[i][k] + distance[k][j] < distance[i][j]) {
					distance[i][j] = distance[i][k] + distance[k][j];
				}
			}
		}
	}
	printf("每对顶点间的最短距离：\n");
	for (i = 0; i < G->vexnum; i++) {
		for (j = 0; j < G->vexnum; j++) {
			if (distance[i][j] == MaxInt) {
				printf("∞ ");
			}
			else {
				printf("%d ", distance[i][j]);
			}
		}
		printf("\n");
	}
}